package com.ruoyi.contract.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.contract.domain.companyVo.CompanyName;
import com.ruoyi.contract.domain.invoiceVo.InvoiceInfoVo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 发票对象 invoice
 * 
 * @author ruoyi
 * @date 2024-10-18
 */
public class Invoice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long invoiceId;

    /** 发票所属合同编码 */
    @Excel(name = "发票所属合同编码")
    private String contractCode;

    /** 发票所属公司id */
    @Excel(name = "发票所属公司id")
    private Long belongingCompanyId;

    /** 发票编码 */
    @Excel(name = "发票编码")
    private String code;

    /** 发票类型 */
    @Excel(name = "发票类型")
    private String type;

    /** 发票金额 */
    @Excel(name = "发票金额")
    private BigDecimal money;

    /** 销方公司id */
    @Excel(name = "销方公司id")
    private Long salesInvoiceId;

    /** 购方公司id */
    @Excel(name = "购方公司id")
    private Long buyInvoiceId;

    /** 发票开票开始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date startDate;

    /** 发票开票终止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date terminationDate;

    /** 公司信息 */
    @Excel(name = "公司信息")
    private List<CompanyName> companyInfoList;

    /** 销方公司信息 */
    @Excel(name = "销方公司信息")
    private List<InvoiceInfoVo> saleCompanyInfoList;

    /** 购方公司信息 */
    @Excel(name = "购方公司信息")
    private List<InvoiceInfoVo> purchaseCompanyInfoList;

    /** 发票附件信息 */
    @Excel(name = "发票附件信息")
    private List<InvoiceAttachment> invoiceAttachmentInfo;

    /** 开票日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invoiceTime;

    /** 财务入账类别 */
    @Excel(name = "财务入账类别")
    private String accountType;

    /** 上传者id */
    @Excel(name = "上传者id")
    private Long addUserId;

    /** 上传者 */
    @Excel(name = "上传者")
    private String addUser;

    /** 上传时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addTime;

    /** 修改者id */
    @Excel(name = "修改者id")
    private Long updateUserId;

    /** 修改者 */
    @Excel(name = "修改者")
    private String updateUser;

    /** 发票内容 */
    @Excel(name = "发票内容")
    private String content;

    /** 上传pdf地址 */
    @Excel(name = "上传pdf地址")
    private String pdfAddress;

    public void setInvoiceId(Long invoiceId) 
    {
        this.invoiceId = invoiceId;
    }

    public Long getInvoiceId() 
    {
        return invoiceId;
    }
    public String getContractCode() {
        return contractCode;
    }

    public void setContractCode(String contractCode) {
        this.contractCode = contractCode;
    }
    public void setBelongingCompanyId(Long belongingCompanyId) 
    {
        this.belongingCompanyId = belongingCompanyId;
    }

    public Long getBelongingCompanyId() 
    {
        return belongingCompanyId;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setMoney(BigDecimal money) 
    {
        this.money = money;
    }

    public BigDecimal getMoney() 
    {
        return money;
    }
    public void setSalesInvoiceId(Long salesInvoiceId) 
    {
        this.salesInvoiceId = salesInvoiceId;
    }

    public Long getSalesInvoiceId() 
    {
        return salesInvoiceId;
    }
    public void setBuyInvoiceId(Long buyInvoiceId) 
    {
        this.buyInvoiceId = buyInvoiceId;
    }

    public Long getBuyInvoiceId() 
    {
        return buyInvoiceId;
    }
    public void setInvoiceTime(Date invoiceTime) 
    {
        this.invoiceTime = invoiceTime;
    }

    public Date getInvoiceTime() 
    {
        return invoiceTime;
    }
    public void setAccountType(String accountType) 
    {
        this.accountType = accountType;
    }

    public String getAccountType() 
    {
        return accountType;
    }
    public void setAddUserId(Long addUserId) 
    {
        this.addUserId = addUserId;
    }

    public Long getAddUserId() 
    {
        return addUserId;
    }
    public void setAddTime(Date addTime) 
    {
        this.addTime = addTime;
    }

    public Date getAddTime() 
    {
        return addTime;
    }
    public void setUpdateUserId(Long updateUserId) 
    {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateUserId() 
    {
        return updateUserId;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setPdfAddress(String pdfAddress) 
    {
        this.pdfAddress = pdfAddress;
    }

    public String getPdfAddress() 
    {
        return pdfAddress;
    }

    public String getAddUser() {
        return addUser;
    }

    public void setAddUser(String addUser) {
        this.addUser = addUser;
    }

    public String getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(String updateUser) {
        this.updateUser = updateUser;
    }

    public List<InvoiceInfoVo> getSaleCompanyInfoList() {
        return saleCompanyInfoList;
    }

    public void setSaleCompanyInfoList(List<InvoiceInfoVo> saleCompanyInfoList) {
        this.saleCompanyInfoList = saleCompanyInfoList;
    }

    public List<InvoiceInfoVo> getPurchaseCompanyInfoList() {
        return purchaseCompanyInfoList;
    }

    public void setPurchaseCompanyInfoList(List<InvoiceInfoVo> purchaseCompanyInfoList) {
        this.purchaseCompanyInfoList = purchaseCompanyInfoList;
    }

    public List<InvoiceAttachment> getInvoiceAttachmentInfo() {
        return invoiceAttachmentInfo;
    }

    public void setInvoiceAttachmentInfo(List<InvoiceAttachment> invoiceAttachmentInfo) {
        this.invoiceAttachmentInfo = invoiceAttachmentInfo;
    }
    public List<CompanyName> getCompanyInfoList() {
        return companyInfoList;
    }

    public void setCompanyInfoList(List<CompanyName> companyInfoList) {
        this.companyInfoList = companyInfoList;
    }
    public Date getTerminationDate() {
        return terminationDate;
    }

    public void setTerminationDate(Date terminationDate) {
        this.terminationDate = terminationDate;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("invoiceId", getInvoiceId())
            .append("contractCode", getContractCode())
            .append("belongingCompanyId", getBelongingCompanyId())
            .append("code", getCode())
            .append("type", getType())
            .append("money", getMoney())
            .append("salesInvoiceId", getSalesInvoiceId())
            .append("buyInvoiceId", getBuyInvoiceId())
            .append("invoiceTime", getInvoiceTime())
            .append("accountType", getAccountType())
            .append("addUserId", getAddUserId())
            .append("addTime", getAddTime())
            .append("updateUserId", getUpdateUserId())
            .append("updateTime", getUpdateTime())
            .append("content", getContent())
            .append("remark", getRemark())
            .append("pdfAddress", getPdfAddress())
            .toString();
    }
}
